perm filename DD.DOC[DD,BGB]1 blob
sn#001292 filedate 1972-03-02 generic text, type T, neo UTF8
00100 DDCALL and DDJOB - A Prototype of a Data Disc Display Spooler.
00200
00300 Bruce g. Baumgart
00400
00500
00600 ABSTRACT
00700
00800 DDJOB creates Data Disc buffers of graphics and TV pictures.
00900 DDJOB is bit raster oriented and follows the clear white light of
01000 windowing. Bit rasters provide a common ground on which images
01100 and graphics can be combined. Windows provide a way to deal with
01200 image addressing (physical and logical), zooming, scaling,
01300 magnification, clipping, cropping, aspect ratios and buffer
01400 allocation.
01500
01600 DDJOB waits for letters from DDCALL. The DDCALL routines
01700 are not III compatible because I have never liked the III very much,
01800 a program that reads III buffers and sends appropriate letters to
02100
02200 The require source file statement for declaring these ruotines is:
02300
02400 REQUIRE "DD[DD,BGB]" SOURCE_FILE;
02500
02600 At present the mechanisms in DDCALL will load a distinct DDJOB for
02700 each project programmer as it becomes necessary. For programmer XXX,
02800 the DDJOB is renamed to DDJXXX and is run thru PTY.
00100 I. GRAPHICS.
00200
00300 BEGIN "TEST1"
00400 REQUIRE "DD[DD,BGB]" SOURCE_FILE;
00500 SETDWN(40,40,350,350);
00600 SETLWN(0,0,1,1);
00700 ERASDD;
00800 AI(-1,-1);
00900 AV( 1,-1);
01000 AV( 1, 1);
01100 AV(-1, 1);
01200 AV(-1,-1);
01300 AI(-0.5,0);AV(+0.5,0);
01400 AI(0,-0.5);AV(0,+0.5);
01500 AI(0,0);ARC(0.75, 6.3, 0);
01600 SHOWDD(0);
01700 DDSTR(0.25, 0.5, 0, "DISPLAY EXAMPLE !");
01800 INCHRW;
01900 END "TEST1"
02000
02100 The above program will display a cross within a circle within
02200 a rectangle with a label on your local Data Disc Screen.
00100 SUMMARY OF DDCALL ROUTINES
00200
00300 ERASTV; Erases the six video synthesizer channels.
00400 ERASDD; Erases your local data disc screen.
00500
00600 DPYDD (STRING File; INTEGER ARRAY Swindo, Owindo, Levels);
00700
00800 DPYDD gets a TV file from the 2314 and repacks the bits by
00900 levels and stores the TV image and the repacked image on the
01000 Librascope in order to expedite subsequent DPYDD's. Swindo is an
01100 integer array [1:4] containing the source window: sx,sy,sdx,sdy.
01200 Owindo is an integer array [1:3] containing the object window:
01300 ox,oy,magpow. (Windows are explained on page three).
01400
01500 The Levels array [1:6] contains channel numbers. hannel #0 is
01600 a no operation. DPYDD always sets the logical window and the
01700 physical destination window, so that a DPYDD followed by graphics
01800 primitives results in a combined image properly clipped and scaled.
01900
02000 SETLWN(real lx,ly,ldx,ldy); Initializes the Graphics Logical Window.
02100 SETDWN(integer dr,dc,dm,dn ); Initializes the Physical Destination Window.
02200 SETWND(real array lwn;integer array dwn); Combines SETLWN and SETDWN.
02300
02400 The graphics primitives:(details given on page four)
02500 AI(X,Y);AV(X,Y);DOT(X,Y);ARC(R,L,A);RADIAL(R1,R2,A);DMS(dddmmss);
02600
02700 DDSTR (x,y,chn,str); Data Disc string at x,y.
02800 DDSTRC(r,c,chn,str); Data Disc string at row column.
02900 DDTYPE(Y,GLITCHES,LINES);
03000
03100 SHOWDD(INTEGER levchn); Outputs a graphics image. Negative levchn
03200 IOR's the image onto the DD, Positive levchn causes replacement.
03300 Levchn itself should be a two digit octal number, Level concatenated
03400 with Channel.
03500
03600 DRUMDD(frame);
03700 Positive frame numbers cause the next dd buffers shown by
03800 DPYDD or SHOWDD to go to the librascope. Negative frame numbers get
03900 the frame from the librascope and display it. The zero frame flushes
04000 the librascope (well you see there is this chain on the back of the
04100 librascope). Ordinary mortals are limited to 150 frames, since the
04200 librascope can only hold 300 frames in all. Drum frames are like
04300 glass and even if The Ernest Television Crossbar Switch should happen
04400 to work, we will still be up against the wall for tracks, so IORing
04500 tracks thru Ernest is not a solution to the glass problem since the
04600 number of tracks is so ridiculously small.
04700
04800 TVSEG(file,segname);
04900 Gets a TV file from the 2314 or from the librascope, and
05000 makes an upper segment out of it. Null string segnam flushs the file
05100 off the librascope, null string file name flushs the segment.
00100 SPECIFIC WINDOWS
00200
00300 TV file window frame - TVM & TVN forever 216 by 288.
00400
00500 TV images contain so many rows, TVM, and so many columns,
00600 TVN, and consequently image manipulations must be restricted to these
00700 bounds. The number of rows and columns is computed from the image
00800 file header, unusually large or negative counts cause the file to be
00900 ignored. At our present primitive state of cameras, digitization and
01000 memory I have come to prefer images which contain 216 rows of 288
01100 columns of sixbits per pixel, this standard arises from the
01200 convenience of dimensions that are divisible by as many factors of
01300 two and three as possible. All images are expanded or truncated to
01400 fit into 216 rows by 288 columns by 6 bits.
01500
01600 Data Disc window frame - DDM & DDN forever 480 by 512.
01700
01800 The data disc can display 482 lines of 512 bits each, however
01900 for the sake of divisibility by four DDM is only 480 lines.
02000
02100 Source Window - INTEGER SX,SY,SDX,SDY;
02200
02300 The source window defines a subset of a TV file.
02400
02500 Object Window - INTEGER OX,OY,MAGPOW.
02600
02700 The object window defines a mapping from a TV file onto the
02800 data disc screen. OX,OY is where the center of the source window is
02900 to be placed on the screen. MAGPOW is the logrithm base two of a
03000 magnification factor, so each source image pixel gets mapped into
03100 (2↑MAGPOW)↑2 object image pixels. No interpolation or smoothing is
03200 done.
03300
03400 Logical Window - REAL LX,LY,LDX,LDY;
03500
03600 The logical window defines the address space for the graphics
03700 primitives: DOT, AI, AV, ARC, RADIAL and DDSTR.
03800
03900 Data Disc Physical Window or Destination Window - INTEGER DR,DC,DM,DN.
04000
04100 The physical destination window defines the patch of data disc
04200 screen in which the logical window appears.
00100 THE GRAPHICS PRIMITIVES
00200
00300 AI(X,Y).................Position Pseudo Beam.
00400 AV(X,Y).................Absolute Vector to new pseudo beam position.
00500 DOT(X,Y)................Absolute point, doesn't affect beam position.
00600
00700 ARC(R,L,A);
00800 ARC displays an arc of radius R centered about the most
00900 recent beam position. L is the arc's directed length from a starting
01000 point A radians from the positive X axis, L & A are in radians and
01100 CCW is the positive orientation.
01200
01300 RADIAL (R1,R2,A);
01400 RADIAL displays the line segment which radiates from the
01500 pseudo beam position in the direction A, and lies between the radii
01600 R1 and R2, the pseudo beam remains fixed unless R1=R2;
01700
01800 Real DMS (integer dddmmss)
01900 DMS converts from degrees, minutes and seconds to radians.
02000 The argument is a decimal integer ((ddd*100+mm)*100+ss.